package com.platform.qujia.service.impl;

import com.platform.qujia.dao.LabelMapper;
import com.platform.qujia.pojo.CustomerLabel;
import com.platform.qujia.pojo.LabelRule;
import com.platform.qujia.service.LabelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("labelService")
public class LabelServiceImpl implements LabelService {
    @Resource
    private LabelMapper labelMapper;

    //获取标签优惠规则
    @Override
    public List<LabelRule> getLabelRuleList(LabelRule labelRule) {
        return labelMapper.getLabelRuleList(labelRule);
    }

    //新增标签用户
    @Override
    public void insertCustomerLabel(CustomerLabel customerLabel) {
        labelMapper.insertCustomerLabel(customerLabel);
    }

    //更新用户新标签组
    @Override
    public void updateCustomerLabel(CustomerLabel customerLabel) {
        labelMapper.updateCustomerLabel(customerLabel);
    }

    //获取标签用户信息
    @Override
    public CustomerLabel getCustomerLabel(CustomerLabel customerLabel) {
        return labelMapper.getCustomerLabel(customerLabel);
    }
}
